import { getImageURL, PromiseWith } from "@/utils";
import { request } from "@/utils/request";

const sleep = (data) =>
  new Promise((resolve) => {
    setTimeout(() => resolve(data), 500);
  });
export const get_active_info = () => request({ url: "/api/project/info" });

export const login_user_info = (code, channel) =>
  request({ url: "/api/login", method: "POST", data: { code, channel } });

export const get_user_phone = (code) =>
  request({
    url: "/api/get_phone",
    method: "POST",
    data: { code },
  });
export const post_user_reserve = (data) =>
  request({
    url: "/api/reserve",
    method: "POST",
    data,
  });

export const post_user_writeOff = (openid) =>
  request({
    url: "/api/writeOff",
    method: "POST",
    data: { openid },
  });
/**
 sleep({
 bg: getImageURL("/city_map.png"),
 hasWriteOff: false,
 cites: [
 {
 x: 107,
 y: 913,
 width: 140,
 height: 83,
 id: 1,
 name: "成都王府井",
 url: getImageURL("/c-1.png"),
 dates: [
 { value: "3月2日", disabled: [1, 3] },
 { value: "3月3日", disabled: [1, 3] },
 { value: "3月4日", disabled: [1, 3] },
 { value: "3月5日", disabled: [1, 3] },
 ],
 },
 {
 x: 119,
 y: 1083,
 width: 140,
 height: 83,
 id: 2,
 name: "成都万象城",
 url: getImageURL("/c-2.png"),
 dates: [
 { value: "3月2日", disabled: [1, 3] },
 { value: "3月3日", disabled: [1, 3] },
 { value: "3月4日", disabled: [1, 3] },
 { value: "3月5日", disabled: [1, 3] },
 ],
 },
 {
 x: 50,
 y: 500,
 width: 100,
 height: 100,
 id: 3,
 name: "重庆世纪新都",
 url: getImageURL("/c-3.png"),
 },
 {
 x: 50,
 y: 700,
 width: 100,
 height: 100,
 id: 4,
 name: "南京中央",
 url: getImageURL("/c-4.png"),
 },
 {
 x: 50,
 y: 700,
 width: 100,
 height: 100,
 id: 5,
 name: "杭州武林银泰",
 url: getImageURL("/c-5.png"),
 },
 {
 x: 50,
 y: 700,
 width: 100,
 height: 100,
 id: 6,
 name: "沈阳万象城",
 url: getImageURL("/c-6.png"),
 },
 {
 x: 50,
 y: 700,
 width: 100,
 height: 100,
 id: 7,
 name: "哈尔滨远大",
 url: getImageURL("/c-7.png"),
 },
 {
 x: 50,
 y: 700,
 width: 100,
 height: 100,
 id: 8,
 name: "呼和浩特振华",
 url: getImageURL("/c-8.png"),
 },
 {
 x: 50,
 y: 700,
 width: 100,
 height: 100,
 id: 9,
 name: "乌鲁木齐汇嘉",
 url: getImageURL("/c-9.png"),
 },
 ],
 scenes: [
 { value: 1, label: "10：00 - 11：00" },
 { value: 2, label: "11：00 - 12：00" },
 { value: 3, label: "12：00 - 13：00" },
 { value: 4, label: "13：00 - 14：00" },
 { value: 5, label: "14：00 - 15：00" },
 { value: 6, label: "15：00 - 16：00" },
 { value: 7, label: "16：00 - 17：00" },
 { value: 8, label: "17：00 - 18：00" },
 { value: 10, label: "18：00 - 19：00" },
 { value: 11, label: "19：00 - 20：00" },
 { value: 12, label: "20：00 - 21：00" },
 { value: 13, label: "21：00 - 12：00" },
 ],
 });
 **/
